package com.hzy.fivepalace.common.type;

/**
 * 收藏类型枚举
 */
public enum CollectTypeEnums {
    GOODS(new Byte("0"), "商品收藏"), SHOP(new Byte("1"), "店铺");
    private Byte id;

    private String desc;

    CollectTypeEnums(Byte id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public static CollectTypeEnums getEnum(Byte id) {
        for (CollectTypeEnums collectTypeEnums : CollectTypeEnums.values()) {
            int deleteTypeEnumsId = collectTypeEnums.getId();
            if (id == deleteTypeEnumsId) {
                return collectTypeEnums;
            }
        }
        return null;
    }

    public Byte getId() {
        return id;
    }

    public String getDesc() {
        return desc;
    }
}
